Vue.js in Action by Erik Hanchett & Benjamin Listwon
Author:Erik Hanchett & Benjamin Listwon
Language: eng
Format: mobi, epub
Publisher: Manning Publications
Published: 2018-09-25T17:25:07.905000+00:00
},
filters: {
...
},
created: function() {
axios.get('/static/products.json') 2
.then((response) =>{
this.products=response.data.products;
console.log(this.products);
});
}
}
</script>
1 Imports MyHeader into project
2 JSON products file is located in the static folder with the absolute path.
After copying the file, delete the styles and logo.png <img> tag in the App.vue file. If you like, you can also delete the logo.png file in the assets folder. Make sure to restart the Vue-CLI server by running npm run dev, if you haven’t already. You should see the pet store application launch, where you can navigate to the checkout page by clicking the Checkout button (figure 7.7). If you receive any errors, double-check the console. For example, if you forgot to import the Axios library inside index.html as we did in listing 7.9, you’ll get an error.
Figure 7.7. Pet store application opened with Vue-CLI.
Download
Vue.js in Action by Erik Hanchett & Benjamin Listwon.epub
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7810)
Grails in Action by Glen Smith Peter Ledbrook(7719)
Configuring Windows Server Hybrid Advanced Services Exam Ref AZ-801 by Chris Gill(6848)
Azure Containers Explained by Wesley Haakman & Richard Hooper(6848)
Running Windows Containers on AWS by Marcio Morales(6374)
Kotlin in Action by Dmitry Jemerov(5092)
Microsoft 365 Identity and Services Exam Guide MS-100 by Aaron Guilmette(5074)
Combating Crime on the Dark Web by Nearchos Nearchou(4650)
Microsoft Cybersecurity Architect Exam Ref SC-100 by Dwayne Natwick(4624)
Management Strategies for the Cloud Revolution: How Cloud Computing Is Transforming Business and Why You Can't Afford to Be Left Behind by Charles Babcock(4438)
The Ruby Workshop by Akshat Paul Peter Philips Dániel Szabó and Cheyne Wallace(4339)
The Age of Surveillance Capitalism by Shoshana Zuboff(3981)
Python for Security and Networking - Third Edition by José Manuel Ortega(3899)
The Ultimate Docker Container Book by Schenker Gabriel N.;(3559)
Learn Wireshark by Lisa Bock(3538)
Learn Windows PowerShell in a Month of Lunches by Don Jones(3528)
Mastering Python for Networking and Security by José Manuel Ortega(3376)
Mastering Azure Security by Mustafa Toroman and Tom Janetscheck(3356)
Blockchain Basics by Daniel Drescher(3326)
